package com.list.arraylist;

import java.util.ArrayList;
import java.util.Iterator;

public class ThirdArrayList2 {
public static void main(String[] args) {
	ArrayList<String> fname=new ArrayList<String>();
	fname.add("deepak");
	fname.add("avinash");
	fname.add("amit");
	ArrayList<String> lname=new ArrayList<String>();
	lname.add("goswami");
	lname.add("singh");
	lname.add("jha");
	ArrayList<String> name=new ArrayList<String>();
	Iterator<String> it1=fname.iterator();
	Iterator<String> it2=lname.iterator();
	while(it1.hasNext() && it2.hasNext()){
		String f=it1.next();
		String l=it2.next();
		name.add(f+" "+l);
	}
	for(String str:name){
		System.out.println(str);
	}
	
}
}
